package net.sx.minemodule.mvp.presenters;


import android.view.View;

import com.kedll.library.mvp.BasePresenter;

import net.sx.minemodule.MineApiUtils;
import net.sx.minemodule.mvp.bean.AfterBean;
import net.sx.minemodule.mvp.views.MineApplyAfterSaleView;

import org.json.JSONObject;


public class MineApplyAfterSalePresenter extends BasePresenter<MineApplyAfterSaleView> {
    private AfterBean mModel;

    public MineApplyAfterSalePresenter(MineApplyAfterSaleView mView, AfterBean model) {
        super(mView);
        this.mModel = model;
    }


    public void getRefundArry() {
        MineApiUtils.getApplySales(mModel.getSid(), s -> {
            mView.showRefundReasonDialog(new JSONObject(s).getString("RefundArry"));
        }, throwable -> {

        });
    }


    /**
     * 退款点击
     */
    public void refundClick(View view) {
        mView.showRefundUi();
    }

    /**
     * 退款退货点击
     */
    public void returnGoodsClick(View view) {
        mView.showReturnGoodsUi();
    }

}
